<?php
if (!empty($_FILES)) {
	/*$tempFile = $_FILES['Filedata']['tmp_name'];
	$file_name = $_FILES['Filedata']['name'];
	
	$targetFile =  str_replace('//','/',$targetPath) . $file_name;
	if (move_uploaded_file($tempFile,$targetFile)){
		echo $file_name;
	}*/
        echo realpath(APPPATH . '../uploads');
        echo $targetPath."xD";
        $tempFile = $_FILES['Filedata']['tmp_name'];
	$file_name = $_FILES['Filedata']['name'];
	$targetPath = 'C:/AppServ/www/rationalucm' . $_REQUEST['folder'] . '/';
        echo $targetPath;
	$targetFile =  str_replace('//','/',$targetPath) . $file_name;
	if (move_uploaded_file($tempFile,$targetFile)){
		echo $file_name;
	}
}
?>
